import { UnknownObjProps } from "@/interface/public";

/**
 * @name 操作对象  将字符分割将对应字段设置到新的对象中
 */
export const setNewObjValue = (obj: UnknownObjProps, str: string) => {
  const arr = str.split(",");
  let newObj: any = {};
  for (let key of arr) {
    newObj[key] = obj[key];
  }
  return newObj;
};
